"""父类"""
from config.config import HOST
class BasePage():
    def __init__(self, driver):
        self.driver = driver
        self.url = f'http://{HOST}{self.url}'

    def open(self):
        self.driver.get(self.url)

    def current_url(self):
        return self.driver.current_url

    def close(self):
        self.driver.close()

    def input(self,locator,value):
        """定义一个输入的方法，传定位器和值，且定位器已经解构了"""
        self.driver.find_element(*locator).send_keys(value)